﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 中介者模式
{
    /// <summary>
    /// 定义一个人
    /// </summary>
    public abstract  class BaseCharacter
    {

        public string Name { get; set; }

        /// <summary>
        /// 发消息
        /// </summary>
        /// <param name="message">消息</param>
        /// <param name="characterTo">发给谁</param>
        public abstract void SendMessage(string message, BaseCharacter characterTo);

        /// <summary>
        /// 收消息
        /// </summary>
        /// <param name="message">消息</param>
        /// <param name="characterFrom">消息来自那里</param>
        public abstract void GetMessage(string message, BaseCharacter characterFrom);
    }
}
